﻿Imports System
Imports System.Text
Imports System.Collections.Generic
Imports Microsoft.VisualStudio.TestTools.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting
Imports Microsoft.Data.Schema.UnitTesting.Conditions

<TestClass()> _
Public Class procCreateInnerException
    Inherits DatabaseTestClass

    Sub New()
        InitializeComponent()
    End Sub

    <TestInitialize()> _
    Public Sub TestInitialize()
        InitializeTest()
    End Sub

    <TestCleanup()> _
    Public Sub TestCleanup()
        CleanupTest()
    End Sub

  Public Sub DatabaseTest1()
    Dim testActions As DatabaseTestActions = Me.DatabaseTest1Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub
  <TestMethod()> _
  Public Sub UT000002()
    Dim testActions As DatabaseTestActions = Me.UT000002Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub
  <TestMethod()> _
  Public Sub UT000003()
    Dim testActions As DatabaseTestActions = Me.UT000003Data
    'Execute the pre-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PretestAction) Is Nothing), "Executing pre-test script...")
    Dim pretestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PretestAction)
    'Execute the test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.TestAction) Is Nothing), "Executing test script...")
    Dim testResults() As ExecutionResult = TestService.Execute(Me.ExecutionContext, Me.PrivilegedContext, testActions.TestAction)
    'Execute the post-test script
    '
    System.Diagnostics.Trace.WriteLineIf((Not (testActions.PosttestAction) Is Nothing), "Executing post-test script...")
    Dim posttestResults() As ExecutionResult = TestService.Execute(Me.PrivilegedContext, Me.PrivilegedContext, testActions.PosttestAction)
  End Sub



#Region "Designer support code"

  'NOTE: The following procedure is required by the Designer
  'It can be modified using the Designer.  
  'Do not modify it using the code editor.
  <System.Diagnostics.DebuggerStepThrough()> _
  Private Sub InitializeComponent()
    Dim UT000002_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(procCreateInnerException))
    Dim UT000002_ScalarValue_ExceptionID As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000002_ScalarValue_Message As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000002_ScalarValue_Source As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000002_ScalarValue_StackTrace As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000002_ScalarValue_TargetSite As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000002_PretestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000002_PosttestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000003_TestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000003_ScalarValue_ExceptionID As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000003_ScalarValue_Message As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000003_ScalarValue_Source As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000003_ScalarValue_StackTrace As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000003_ScalarValue_TargetSite As Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    Dim UT000003_PretestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Dim UT000003_PosttestAction As Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    Me.UT000002Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    Me.UT000003Data = New Microsoft.Data.Schema.UnitTesting.DatabaseTestActions
    UT000002_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000002_ScalarValue_ExceptionID = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000002_ScalarValue_Message = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000002_ScalarValue_Source = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000002_ScalarValue_StackTrace = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000002_ScalarValue_TargetSite = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000002_PretestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000002_PosttestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000003_TestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000003_ScalarValue_ExceptionID = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000003_ScalarValue_Message = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000003_ScalarValue_Source = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000003_ScalarValue_StackTrace = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000003_ScalarValue_TargetSite = New Microsoft.Data.Schema.UnitTesting.Conditions.ScalarValueCondition
    UT000003_PretestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    UT000003_PosttestAction = New Microsoft.Data.Schema.UnitTesting.DatabaseTestAction
    '
    'UT000002_TestAction
    '
    UT000002_TestAction.Conditions.Add(UT000002_ScalarValue_ExceptionID)
    UT000002_TestAction.Conditions.Add(UT000002_ScalarValue_Message)
    UT000002_TestAction.Conditions.Add(UT000002_ScalarValue_Source)
    UT000002_TestAction.Conditions.Add(UT000002_ScalarValue_StackTrace)
    UT000002_TestAction.Conditions.Add(UT000002_ScalarValue_TargetSite)
    resources.ApplyResources(UT000002_TestAction, "UT000002_TestAction")
    '
    'UT000002_ScalarValue_ExceptionID
    '
    UT000002_ScalarValue_ExceptionID.ColumnNumber = 3
    UT000002_ScalarValue_ExceptionID.Enabled = True
    UT000002_ScalarValue_ExceptionID.ExpectedValue = "UT000002"
    UT000002_ScalarValue_ExceptionID.Name = "UT000002_ScalarValue_ExceptionID"
    UT000002_ScalarValue_ExceptionID.NullExpected = False
    UT000002_ScalarValue_ExceptionID.ResultSet = 1
    UT000002_ScalarValue_ExceptionID.RowNumber = 1
    '
    'UT000002_ScalarValue_Message
    '
    UT000002_ScalarValue_Message.ColumnNumber = 4
    UT000002_ScalarValue_Message.Enabled = True
    UT000002_ScalarValue_Message.ExpectedValue = "Message"
    UT000002_ScalarValue_Message.Name = "UT000002_ScalarValue_Message"
    UT000002_ScalarValue_Message.NullExpected = False
    UT000002_ScalarValue_Message.ResultSet = 1
    UT000002_ScalarValue_Message.RowNumber = 1
    '
    'UT000002_ScalarValue_Source
    '
    UT000002_ScalarValue_Source.ColumnNumber = 5
    UT000002_ScalarValue_Source.Enabled = True
    UT000002_ScalarValue_Source.ExpectedValue = "Source"
    UT000002_ScalarValue_Source.Name = "UT000002_ScalarValue_Source"
    UT000002_ScalarValue_Source.NullExpected = False
    UT000002_ScalarValue_Source.ResultSet = 1
    UT000002_ScalarValue_Source.RowNumber = 1
    '
    'UT000002_ScalarValue_StackTrace
    '
    UT000002_ScalarValue_StackTrace.ColumnNumber = 6
    UT000002_ScalarValue_StackTrace.Enabled = True
    UT000002_ScalarValue_StackTrace.ExpectedValue = "StackTrace"
    UT000002_ScalarValue_StackTrace.Name = "UT000002_ScalarValue_StackTrace"
    UT000002_ScalarValue_StackTrace.NullExpected = False
    UT000002_ScalarValue_StackTrace.ResultSet = 1
    UT000002_ScalarValue_StackTrace.RowNumber = 1
    '
    'UT000002_ScalarValue_TargetSite
    '
    UT000002_ScalarValue_TargetSite.ColumnNumber = 7
    UT000002_ScalarValue_TargetSite.Enabled = True
    UT000002_ScalarValue_TargetSite.ExpectedValue = "TargetSite"
    UT000002_ScalarValue_TargetSite.Name = "UT000002_ScalarValue_TargetSite"
    UT000002_ScalarValue_TargetSite.NullExpected = False
    UT000002_ScalarValue_TargetSite.ResultSet = 1
    UT000002_ScalarValue_TargetSite.RowNumber = 1
    '
    'UT000002_PretestAction
    '
    resources.ApplyResources(UT000002_PretestAction, "UT000002_PretestAction")
    '
    'UT000002_PosttestAction
    '
    resources.ApplyResources(UT000002_PosttestAction, "UT000002_PosttestAction")
    '
    'UT000003_TestAction
    '
    UT000003_TestAction.Conditions.Add(UT000003_ScalarValue_ExceptionID)
    UT000003_TestAction.Conditions.Add(UT000003_ScalarValue_Message)
    UT000003_TestAction.Conditions.Add(UT000003_ScalarValue_Source)
    UT000003_TestAction.Conditions.Add(UT000003_ScalarValue_StackTrace)
    UT000003_TestAction.Conditions.Add(UT000003_ScalarValue_TargetSite)
    resources.ApplyResources(UT000003_TestAction, "UT000003_TestAction")
    '
    'UT000003_ScalarValue_ExceptionID
    '
    UT000003_ScalarValue_ExceptionID.ColumnNumber = 3
    UT000003_ScalarValue_ExceptionID.Enabled = True
    UT000003_ScalarValue_ExceptionID.ExpectedValue = "UT000003"
    UT000003_ScalarValue_ExceptionID.Name = "UT000003_ScalarValue_ExceptionID"
    UT000003_ScalarValue_ExceptionID.NullExpected = False
    UT000003_ScalarValue_ExceptionID.ResultSet = 1
    UT000003_ScalarValue_ExceptionID.RowNumber = 1
    '
    'UT000003_ScalarValue_Message
    '
    UT000003_ScalarValue_Message.ColumnNumber = 4
    UT000003_ScalarValue_Message.Enabled = True
    UT000003_ScalarValue_Message.ExpectedValue = "Message"
    UT000003_ScalarValue_Message.Name = "UT000003_ScalarValue_Message"
    UT000003_ScalarValue_Message.NullExpected = False
    UT000003_ScalarValue_Message.ResultSet = 1
    UT000003_ScalarValue_Message.RowNumber = 1
    '
    'UT000003_ScalarValue_Source
    '
    UT000003_ScalarValue_Source.ColumnNumber = 5
    UT000003_ScalarValue_Source.Enabled = True
    UT000003_ScalarValue_Source.ExpectedValue = "Source"
    UT000003_ScalarValue_Source.Name = "UT000003_ScalarValue_Source"
    UT000003_ScalarValue_Source.NullExpected = False
    UT000003_ScalarValue_Source.ResultSet = 1
    UT000003_ScalarValue_Source.RowNumber = 1
    '
    'UT000003_ScalarValue_StackTrace
    '
    UT000003_ScalarValue_StackTrace.ColumnNumber = 6
    UT000003_ScalarValue_StackTrace.Enabled = True
    UT000003_ScalarValue_StackTrace.ExpectedValue = "StackTrace"
    UT000003_ScalarValue_StackTrace.Name = "UT000003_ScalarValue_StackTrace"
    UT000003_ScalarValue_StackTrace.NullExpected = False
    UT000003_ScalarValue_StackTrace.ResultSet = 1
    UT000003_ScalarValue_StackTrace.RowNumber = 1
    '
    'UT000003_ScalarValue_TargetSite
    '
    UT000003_ScalarValue_TargetSite.ColumnNumber = 7
    UT000003_ScalarValue_TargetSite.Enabled = True
    UT000003_ScalarValue_TargetSite.ExpectedValue = "TargetSite"
    UT000003_ScalarValue_TargetSite.Name = "UT000003_ScalarValue_TargetSite"
    UT000003_ScalarValue_TargetSite.NullExpected = False
    UT000003_ScalarValue_TargetSite.ResultSet = 1
    UT000003_ScalarValue_TargetSite.RowNumber = 1
    '
    'UT000002Data
    '
    Me.UT000002Data.PosttestAction = UT000002_PosttestAction
    Me.UT000002Data.PretestAction = UT000002_PretestAction
    Me.UT000002Data.TestAction = UT000002_TestAction
    '
    'UT000003Data
    '
    Me.UT000003Data.PosttestAction = UT000003_PosttestAction
    Me.UT000003Data.PretestAction = UT000003_PretestAction
    Me.UT000003Data.TestAction = UT000003_TestAction
    '
    'UT000003_PretestAction
    '
    resources.ApplyResources(UT000003_PretestAction, "UT000003_PretestAction")
    '
    'UT000003_PosttestAction
    '
    resources.ApplyResources(UT000003_PosttestAction, "UT000003_PosttestAction")
  End Sub

#End Region

#Region "Additional test attributes"
  '
  ' You can use the following additional attributes as you write your tests:
  '
  ' Use ClassInitialize to run code before running the first test in the class
  ' <ClassInitialize()> Public Shared Sub MyClassInitialize(ByVal testContext As TestContext)
  ' End Sub
  '
  ' Use ClassCleanup to run code after all tests in a class have run
  ' <ClassCleanup()> Public Shared Sub MyClassCleanup()
  ' End Sub
  '
#End Region

  Private DatabaseTest1Data As DatabaseTestActions
  Private UT000002Data As DatabaseTestActions
  Private UT000003Data As DatabaseTestActions
End Class

